package xyx.ysfwpt.service;

import org.apache.ibatis.annotations.Param;
import xyx.ysfwpt.model.Order;
import xyx.ysfwpt.model.OrderDetail;

import java.util.List;
import java.util.Map;

public interface OrderService {

    List<Order> selectAllOrder();

    List<Order> selectOrderByInputList(@Param(value = "user_id") int user_id,
                                       @Param(value = "user_type") String user_type,
                                       @Param(value = "hospital") String hospital,
                                       @Param(value = "user_department") String user_department,
                                       @Param(value = "state") Integer state,
                                       @Param(value = "source") String source,
                                       @Param(value = "type") Integer type,
                                       @Param(value = "searchword") String searchword,
                                       @Param(value = "timefrom") String timefrom,
                                       @Param(value = "timeto") String timeto,
                                       @Param(value = "isDirector") String isDirector,
                                       @Param(value = "department") String department);

    List<OrderDetail>  selectMedicineByOrderId(String order_id);

    Order selectOrderDetailByOrderId(String order_id);

    void updateOrderState(@Param(value = "order_id") String order_id,
                          @Param(value = "state") Integer state,
                          @Param(value = "reason_name") String reason_name,
                          @Param(value = "reason") String reason);

    void updateOrderExpress(@Param(value = "order_id") String order_id,
                            @Param(value = "express_company_name") String express_company_name,
                            @Param(value = "express_price") float express_price,
                            @Param(value = "express_id") String express_id);

    List<Map> selectOrderAmountByYear(@Param(value = "yearfrom") String yearfrom,
                                      @Param(value = "yearto") String yearto,
                                      @Param(value = "type") String type);

    Map selectOrderAmountAndMoney1(@Param(value = "timefrom") String timefrom,
                                   @Param(value = "timeto") String timeto);

    Map selectOrderAmountAndMoney2(@Param(value = "timefrom") String timefrom,
                                   @Param(value = "timeto") String timeto);

    List<Map> selectOrderByDay0(@Param(value = "timefrom") String timefrom,
                                @Param(value = "timeto") String timeto);

    List<Map> selectOrderByDay1(@Param(value = "timefrom") String timefrom,
                                @Param(value = "timeto") String timeto);

    List<Map> selectOrderByDay2(@Param(value = "timefrom") String timefrom,
                                @Param(value = "timeto") String timeto);

}
